<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>水仙花数</title>
</head>
<body>
    <script>
        /* 打印100 - 999之间的 为水仙花 的数字 */

        for(var num = 100;num <= 999;num++){
            //百
            var h = parseInt(num/100);
            //十
            var d = parseInt((num%100)/10);
            //个
            var b = (num%100)%10;
            if(h*h*h + d*d*d + b*b*b === num){
                document.write(num + '<br/>');
            }
        }
    </script>
</body>
</html>